home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / m / muiv3.1cracked.lha / MUI / Developer / Modula / txt / MuiMacros.def < prev    next >
Text File  |  1995-11-18  |  21KB  |  638 lines

  1. DEFINITION MODULE MuiMacros;
  2.  
  3. (*$ DEFINE Locale:= TRUE *)
  4. (*$ DEFINE MUIOBSOLETE := FALSE *)
  5. (*$ DEFINE MUI3        := TRUE  *)
  6.  
  7. (****************************************************************************
  8. **
  9. ** $VER: MuiMacros.def 3.1 (18.11.95)
  10. **
  11. ** The following updates have been done by
  12. **
  13. **   Olaf "Olf" Peters <olf@informatik.uni-bremen.de>
  14. **
  15. ** $HISTORY:
  16. **
  17. ** 18.11.95  3.1   : updated for MUI v3.1 release
  18. **  17.9.95  2.3   : updated to MUI v2.3
  19. **
  20. ****************************************************************************)
  21.  
  22. (****************************************************************************
  23. **
  24. **      MUI Macros 2.0
  25. **
  26. **      Converted to Modula by Christian "Kochtopf" Scholz
  27. **
  28. **      refer also to MuiMacros.mod if you want to know, how they are made.
  29. **
  30. **      $Id: MuiMacros.def 1.3 1995/11/18 16:46:18 olf Exp olf $
  31. **
  32. **      $Log: MuiMacros.def $
  33. # Revision 1.3  1995/11/18  16:46:18  olf
  34. # MUI Release 3.1
  35. #
  36. # Revision 1.2  1995/10/23  17:06:34  olf
  37. # *** empty log message ***
  38. #
  39. # Revision 1.1  1995/09/25  15:32:52  olf
  40. # Initial revision
  41. #
  42. # Revision 1.8  1994/08/18  18:52:20  Kochtopf
  43. # changed popbutton
  44. #
  45. # Revision 1.7  1994/08/11  16:59:45  Kochtopf
  46. # *** empty log message ***
  47. #
  48. # Revision 1.6  1994/06/27  22:06:41  Kochtopf
  49. # put some Macros in MUIObsolete-Parenthesis, because one should
  50. # now use mMakeObj.
  51. #
  52. # Revision 1.5  1994/02/15  21:14:05  Kochtopf
  53. # neue Macros fuer Pop* und Register definiert,
  54. # HCenter und VCenter neu
  55. # PopUp entfernt und durch PopButton ersetzt.
  56. # neue Label-Macros LLabel eingefuehrt (aus mui.h)
  57. #
  58. # Revision 1.4  1994/02/09  14:50:03  Kochtopf
  59. # Versionsnummer in 2.0 geaendert.
  60. #
  61. **
  62. ****************************************************************************
  63. ** Class Tree
  64. ****************************************************************************
  65. **
  66. ** rootclass                     (BOOPSI's base class)
  67. ** +--Notify                     (implements notification mechanism)
  68. ** !  +--Family                  (handles multiple children)
  69. ** !  !  +--Menustrip            (describes a complete menu strip)
  70. ** !  !  +--Menu                 (describes a single menu)
  71. ** !  !  \--Menuitem             (describes a single menu item)
  72. ** !  +--Application             (main class for all applications)
  73. ** !  +--Window                  (handles intuition window related topics)
  74. ** !  !  \--Aboutmui             (About window of MUI preferences)
  75. ** !  +--Area                    (base class for all GUI elements)
  76. ** !  !  +--Rectangle            (creates (empty) rectangles)
  77. ** !  !  +--Balance              (creates a balancing separator bar)
  78. ** !  !  +--Image                (creates images)
  79. ** !  !  +--Bitmap               (draws bitmaps)
  80. ** !  !  !  \--Bodychunk         (makes bitmap from ILBM body chunk)
  81. ** !  !  +--Text                 (creates some text)
  82. ** !  !  +--Gadget               (base class for intuition gadgets)
  83. ** !  !  !  +--String            (creates a string gadget)
  84. ** !  !  !  +--Boopsi            (interface to BOOPSI gadgets)
  85. ** !  !  !  \--Prop              (creates a proportional gadget)
  86. ** !  !  +--Gauge                (creates a fule gauge)
  87. ** !  !  +--Scale                (creates a percentage scale)
  88. ** !  !  +--Colorfield           (creates a field with changeable color)
  89. ** !  !  +--List                 (creates a line-oriented list)
  90. ** !  !  !  +--Floattext         (special list with floating text)
  91. ** !  !  !  +--Volumelist        (special list with volumes)
  92. ** !  !  !  +--Scrmodelist       (special list with screen modes)
  93. ** !  !  !  \--Dirlist           (special list with files)
  94. ** !  !  +--Numeric              (base class for slider gadgets)
  95. ** !  !  +--Framedisplay         (displays a frame specification)
  96. ** !  !  !  \--Popframe          (popup button to adjust a frame)
  97. ** !  !  +--Imagedisplay         (displays an image specification)
  98. ** !  !  !  \--Popimage          (popup button to adjust an image spec)
  99. ** !  !  +--Pendisplay           (displays a pen specification)
  100. ** !  !  !  +--Poppen            (popup button to adjust a pen spec)
  101. ** !  !  !  +--Knob              (creates knobs)
  102. ** !  !  !  +--Levelmeter        (creates a level display)
  103. ** !  !  !  +--Numericbutton     (creates space saving popup sliders)
  104. ** !  !  !  \--Slider            (creates slider gadgets)
  105. ** !  !  +--Group                (groups other GUI elements)
  106. ** !  !  !  +--Mccprefs          (base class for extern custom class preferences classes)
  107. ** !  !  !  +--Register          (handles page groups with titles)
  108. ** !  !  !  +--Settingsgroup     (Creates GUI elements to adjust MUIs preferences)
  109. ** !  !  !  +--Settings          (Creates prefs)
  110. ** !  !  !  +--Frameadjust       (creates an object to adjust a frame)
  111. ** !  !  !  !  \--Penadjust      (creates a group to adjust a pen)
  112. ** !  !  !  +--Imageadjust       (creates a group to adjust an image)
  113. ** !  !  !  +--Virtgroup         (handles virtual groups)
  114. ** !  !  !  +--Scrollgroup       (handles virtual groups with scrollers)
  115. ** !  !  !  +--Scrollbar         (creates a scrollbar)
  116. ** !  !  !  +--Listview          (creates a listview)
  117. ** !  !  !  +--Radio             (creates radio buttons)
  118. ** !  !  !  +--Cycle             (creates cycle gadgets)
  119. ** !  !  !  +--Coloradjust       (creates some RGB sliders)
  120. ** !  !  !  +--Palette           (creates a complete palette gadget)
  121. ** !  !  !  +--Popstring         (base class for popups)
  122. ** !  !  !  !  +--Popobject      (popup a MUI object in a window)
  123. ** !  !  !  !  !  +--Poplist     (popup a simple listview)
  124. ** !  !  !  !  !  \--Popscreen   (popup a list of public screens)
  125. ** !  !  !  !  \--Popasl         (popup an asl requester)
  126. ** +--Semaphore                  (baseclass for semaphore equipped objects)
  127. **    +--Applist                 (private class)
  128. **    +--Dataspace               (handles general purpose data spaces)
  129. **       \--Configdata           (handles MUI configuration data)
  130. **
  131. ***************************************************************************)
  132.  
  133. IMPORT  MD:MuiD;
  134. IMPORT  ML:MuiL;
  135. IMPORT  UD:UtilityD;
  136. FROM    UtilityD IMPORT HookPtr;
  137. FROM    SYSTEM IMPORT ADDRESS, ADR, TAG;
  138.  
  139. TYPE    APTR    = ADDRESS;      (* just for readability *)
  140.         StrPtr  = ADDRESS;
  141.  
  142.         ShortString = ARRAY[0..3] OF CHAR;  (* for MakeID *)
  143.  
  144.         (* Here some Types you have to use, IF you want to fill the
  145.            array, the ListDisplayHook gets as parameter and which the hook
  146.            has to fill *)
  147.  
  148.         STRING      = ARRAY[0..128] OF CHAR;
  149.         STRPTR      = POINTER TO STRING;
  150.         STRARR      = ARRAY[0..10] OF STRPTR; (* set 10 to the number of columns you have in your list *)
  151.         STRARRPTR   = POINTER TO STRARR;
  152.  
  153.         (* Use it the following way :
  154.  
  155.         Your Hookfunction :
  156.  
  157.         PROCEDURE dspfunc(hook : HookPtr; array : APTR; entry : APTR) : APTR;
  158.  
  159.             BEGIN
  160.                 CAST(STRARRPTR,array)^[0]:=ADR(first string);
  161.                 CAST(STRARRPTR,array)^[1]:=ADR(second string);
  162.                 ...
  163.                 RETURN 0;
  164.             END dspfunc;
  165.  
  166.         As you see, it is the same as string-arrays in C  *)
  167.  
  168.  
  169.         (* Here your PROCEDURE-Prototype for your hookfunction : *)
  170.  
  171.         HookDef     = PROCEDURE(HookPtr, APTR, APTR):APTR;
  172.  
  173. (*
  174. **  MUI - Object Generation
  175. **
  176. **  These Macros are equal to the C-Macros which can be found in mui.h
  177. **  But notice, that you have a different usage of these :
  178. **
  179. **  Instead of
  180. **
  181. **      app = ApplicationObject,
  182. **
  183. **              ...
  184. **
  185. **            End;
  186. **
  187. **  you now write :
  188. **
  189. **      app := ApplicationObject(TAG(buffer,    (* TAG from SYSTEM *)
  190. **
  191. **              ...
  192. **
  193. **             tagEnd));    (* tagEnd imported from UtilityD *)
  194. **
  195. **  Also you can't use :
  196. **
  197. **      app := ApplicationObject(TAG(buffer,
  198. **
  199. **              ...
  200. **  ====>            window:=WindowObject(TAG(buffer, ... , tagEnd)),
  201. **              ...
  202. **
  203. **             tagEnd));
  204. **
  205. **  instead of this, you have to define your Window-Object before the
  206. **  Application-Object and then use the pointer in the App-Definition :
  207. **
  208. **      window := WindowObject(TAG(buffer, ... , tagEnd)),
  209. **
  210. **      app := ApplicationObject(TAG(buffer,
  211. **
  212. **              ...
  213. **                   window,
  214. **              ...
  215. **
  216. **             tagEnd));
  217. **
  218. **  So you can't define a whole application with one command if you need
  219. **  the pointer of some objects later on (for a Notify, etc.)
  220. **
  221. *)
  222.  
  223. CONST   Child           = MD.maGroupChild;
  224.         SubWindow       = MD.maApplicationWindow;
  225.         WindowContents  = MD.maWindowRootObject;
  226.  
  227. PROCEDURE WindowObject(tags : UD.TagItemPtr) : APTR;
  228. PROCEDURE ImageObject(tags : UD.TagItemPtr) : APTR;
  229. PROCEDURE NotifyObject(tags : UD.TagItemPtr) : APTR;
  230. PROCEDURE ApplicationObject(tags : UD.TagItemPtr) : APTR;
  231. PROCEDURE TextObject(tags : UD.TagItemPtr) : APTR;
  232. PROCEDURE RectangleObject(tags : UD.TagItemPtr) : APTR;
  233. PROCEDURE ListObject(tags : UD.TagItemPtr) : APTR;
  234. PROCEDURE PropObject(tags : UD.TagItemPtr) : APTR;
  235. PROCEDURE StringObject(tags : UD.TagItemPtr) : APTR;
  236. PROCEDURE ScrollbarObject(tags : UD.TagItemPtr) : APTR;
  237. PROCEDURE ListviewObject(tags : UD.TagItemPtr) : APTR;
  238. PROCEDURE RadioObject(tags : UD.TagItemPtr) : APTR;
  239. PROCEDURE VolumelistObject(tags : UD.TagItemPtr) : APTR;
  240. PROCEDURE FloattextObject(tags : UD.TagItemPtr) : APTR;
  241. PROCEDURE DirlistObject(tags : UD.TagItemPtr) : APTR;
  242. PROCEDURE SliderObject(tags : UD.TagItemPtr) : APTR;
  243. PROCEDURE CycleObject(tags : UD.TagItemPtr) : APTR;
  244. PROCEDURE GaugeObject(tags : UD.TagItemPtr) : APTR;
  245. PROCEDURE ScaleObject(tags : UD.TagItemPtr) : APTR;
  246. PROCEDURE BoopsiObject(tags : UD.TagItemPtr) : APTR;
  247. PROCEDURE ColorfieldObject(tags : UD.TagItemPtr) : APTR;
  248. PROCEDURE ColoradjustObject(tags : UD.TagItemPtr) : APTR;
  249. PROCEDURE PaletteObject(tags : UD.TagItemPtr) : APTR;
  250. PROCEDURE GroupObject(tags : UD.TagItemPtr) : APTR;
  251. PROCEDURE VirtgroupObject(tags : UD.TagItemPtr) : APTR;
  252. PROCEDURE ScrollgroupObject(tags : UD.TagItemPtr) : APTR;
  253. PROCEDURE ScrmodelistObject(tags : UD.TagItemPtr) : APTR;
  254. PROCEDURE VGroup(tags : UD.TagItemPtr) : APTR;
  255. PROCEDURE HGroup(tags : UD.TagItemPtr) : APTR;
  256. PROCEDURE ColGroup(cols : LONGCARD; tags : UD.TagItemPtr) : APTR;
  257. PROCEDURE RowGroup(rows : LONGCARD; tags : UD.TagItemPtr) : APTR;
  258. PROCEDURE PageGroup(tags : UD.TagItemPtr) : APTR;
  259. PROCEDURE VGroupV(tags : UD.TagItemPtr) : APTR;
  260. PROCEDURE HGroupV(tags : UD.TagItemPtr) : APTR;
  261. PROCEDURE ColGroupV(cols : LONGCARD; tags : UD.TagItemPtr) : APTR;
  262. PROCEDURE RowGroupV(rows : LONGCARD; tags : UD.TagItemPtr) : APTR;
  263. PROCEDURE PageGroupV(tags : UD.TagItemPtr) : APTR;
  264. PROCEDURE PopString(tags : UD.TagItemPtr) : APTR;
  265. PROCEDURE PopObject(tags : UD.TagItemPtr) : APTR;
  266. PROCEDURE PopAsl(tags : UD.TagItemPtr) : APTR;
  267. (*$ IF MUI3 *)
  268. PROCEDURE PoppenObject(tags : UD.TagItemPtr) : APTR ;
  269. (*$ ENDIF *)
  270. PROCEDURE Register(tags : UD.TagItemPtr) : APTR;
  271. PROCEDURE MenuStripObject(tags : UD.TagItemPtr) : APTR;
  272. PROCEDURE MenuObject(tags : UD.TagItemPtr) : APTR;
  273. (*$ IF Locale *)
  274. PROCEDURE MenuObjectT(name : StrPtr; tags : UD.TagItemPtr) : APTR;
  275. (*$ ELSE *)(*$ CopyDyn := FALSE *)
  276. PROCEDURE MenuObjectT(name : ARRAY OF CHAR; tags : UD.TagItemPtr) : APTR;
  277. (*$ ENDIF *)
  278. PROCEDURE MenuItemObject(tags : UD.TagItemPtr) : APTR;
  279.  
  280. (*$ IF MUI3 *)
  281. PROCEDURE AboutmuiObject(tags : UD.TagItemPtr) : APTR;
  282. PROCEDURE BalanceObject(tags : UD.TagItemPtr) : APTR ;
  283. PROCEDURE KnobObject(tags : UD.TagItemPtr) : APTR ;
  284. PROCEDURE LevelmeterObject(tags : UD.TagItemPtr) : APTR ;
  285. PROCEDURE NumericbuttonObject(tags : UD.TagItemPtr) : APTR ;
  286. PROCEDURE NumericObject(tags : UD.TagItemPtr) : APTR ;
  287. PROCEDURE PenadjustObject(tags : UD.TagItemPtr) : APTR ;
  288. (*$ ENDIF *)
  289.  
  290. (*
  291. **  MakeID
  292. **  Generate an ID out of a 4-char-string.
  293. **  Use it the as WindowID ! (look in MuiTest for an example!)
  294. *)
  295.  
  296. PROCEDURE MakeID (name : ShortString): LONGINT;
  297.  
  298. (*
  299. **
  300. **  Hook Macros
  301. **
  302. **  Use it the following way :
  303. **      1. Write your Hook-Function :
  304. **          PROCEDURE hookfunc(hook:HookPtr; obj : APTR; args : APTR) : APTR
  305. **              BEGIN
  306. **              ...
  307. **              END hookfunc;
  308. **          Note, that your function needs not to specify registers, but
  309. **          your PROCEDURE must be looking like name(HookPtr, APTR, APTR)!!
  310. **
  311. **      2. Define in your VAR-section a pointer to a Hookrecord :
  312. **          VAR hook    : UtilitiesD.HookPtr;
  313. **
  314. **      3. fill it with MakeHook :
  315. **          MakeHook(hookfunc,hook);
  316. **
  317. **      4. Use it with MUI, as you like, e.g. :
  318. **          DoMethod(button,TAG(buffer,MD.mmCallHook,hook,arg1,arg2));
  319. **
  320. *)
  321.  
  322. PROCEDURE MakeHook(entry:HookDef; VAR hook : HookPtr);
  323.  
  324. (*
  325. **
  326. **  Spacing Macros
  327. **
  328. **  (not all from mui.h)
  329. **
  330. *)
  331.  
  332. PROCEDURE HVSpace() : APTR;
  333. PROCEDURE HSpace(x : LONGCARD) : APTR;
  334. PROCEDURE VSpace(x : LONGCARD) : APTR;
  335. PROCEDURE HCenter(obj : APTR) : APTR;
  336. PROCEDURE VCenter(obj : APTR) : APTR;
  337.  
  338. (*
  339. **
  340. **  Popup-Object
  341. **
  342. **
  343. *)
  344.  
  345. PROCEDURE PopButton(img : APTR) : APTR;
  346.  
  347.  
  348.  
  349. (*$ IF MUIObsolete *)
  350.  
  351. (*
  352. **
  353. ** String-Object
  354. **
  355. ** Creates a simple String-Gadget
  356. **
  357. *)
  358.  
  359. (*$ IF Locale *)
  360. PROCEDURE String(contents : StrPtr; maxlen : LONGINT) : APTR;
  361. PROCEDURE KeyString(contents : StrPtr; maxlen : LONGINT; key : CHAR) : APTR;
  362. (*$ ELSE *)
  363. PROCEDURE String(contents : ARRAY OF CHAR; maxlen : LONGINT) : APTR;
  364. PROCEDURE KeyString(contents : ARRAY OF CHAR; maxlen : LONGINT; key : CHAR) : APTR;
  365. (*$ ENDIF *)
  366.  
  367. (*
  368. **
  369. ** Checkmark
  370. **
  371. ** creates a Checkmark Gadget
  372. **
  373. *)
  374.  
  375. PROCEDURE Checkmark(selected : BOOLEAN) : APTR;
  376. PROCEDURE KeyCheckmark(selected : BOOLEAN; key : CHAR) : APTR;
  377.  
  378. (*
  379. **
  380. ** Buttons
  381. **
  382. ** Here the same note : Use small letters for Keybuttons!
  383. **
  384. *)
  385.  
  386. (*$ IF Locale *)
  387. PROCEDURE Simplebutton(name : StrPtr) : APTR;
  388. PROCEDURE Keybutton(name : StrPtr; key : CHAR) : APTR;
  389. (*$ ELSE *)
  390. PROCEDURE Simplebutton(name : ARRAY OF CHAR) : APTR;
  391. PROCEDURE Keybutton(name : ARRAY OF CHAR; key : CHAR) : APTR;
  392. (*$ ENDIF *)
  393.  
  394. (*$ ELSE *) (* if not obsolete *)
  395.  
  396. (*$ IF Locale *)
  397. PROCEDURE Simplebutton(name : StrPtr) : APTR;
  398. (*$ ELSE *)
  399. PROCEDURE Simplebutton(name : ARRAY OF CHAR) : APTR;
  400. (*$ ENDIF *)
  401.  
  402. (*$ ENDIF *) (* MUIObsolete *)
  403.  
  404. (*$ IF MUIObsolete *)
  405.  
  406. (*
  407. **
  408. **  Radio Object
  409. **
  410. *)
  411.  
  412. (*$ IF Locale *)
  413. PROCEDURE Radio(name : StrPtr; array : APTR) : APTR;
  414. (*$ ELSE *)
  415. PROCEDURE Radio(name : ARRAY OF CHAR; array : APTR) : APTR;
  416. (*$ ENDIF *)
  417.  
  418. (*$ IF Locale *)
  419. PROCEDURE KeyRadio(name : StrPtr; array : APTR; key : CHAR) : APTR;
  420. (*$ ELSE *)
  421. PROCEDURE KeyRadio(name : ARRAY OF CHAR; array : APTR; key : CHAR) : APTR;
  422. (*$ ENDIF *)
  423.  
  424.  
  425. (*
  426. **
  427. **  Cycle-Objects
  428. **
  429. *)
  430.  
  431. PROCEDURE Cycle(array : APTR) : APTR;
  432. PROCEDURE KeyCycle(array : APTR; key : CHAR) : APTR;
  433.  
  434. (*
  435. **
  436. **  Slider-Objects
  437. **
  438. *)
  439.  
  440. PROCEDURE Slider(min, max, level : LONGINT; horiz : BOOLEAN) : APTR;
  441. PROCEDURE KeySlider(min, max, level : LONGINT; horiz : BOOLEAN; key : CHAR) : APTR;
  442.  
  443. (*$ ENDIF *) (* MUIObsolete *)
  444.  
  445.  
  446.  
  447. (*
  448. **
  449. ** Label Objects
  450. **
  451. ** The same as in mui.h
  452. **
  453. ** Label()  : create a Label for Objects without a frame
  454. ** Label1() : create a label for Objects with a standard frame (Checkmarks...)
  455. ** Label2() : create a label for Objects with double high frame (String Gadgets...)
  456. **
  457. *)
  458.  
  459. (*$ IF Locale *)
  460. PROCEDURE Label  (label : StrPtr) : APTR;
  461. PROCEDURE Label1 (label : StrPtr) : APTR;
  462. PROCEDURE Label2 (label : StrPtr) : APTR;
  463. PROCEDURE LLabel (label : StrPtr) : APTR;
  464. PROCEDURE LLabel1(label : StrPtr) : APTR;
  465. PROCEDURE LLabel2(label : StrPtr) : APTR;
  466.  
  467. (*$ IF MUI3 *)
  468. PROCEDURE CLabel (label : StrPtr) : APTR ;
  469. PROCEDURE CLabel1(label : StrPtr) : APTR ;
  470. PROCEDURE CLabel2(label : StrPtr) : APTR ;
  471.  
  472. PROCEDURE FreeLabel  (label : StrPtr) : APTR;
  473. PROCEDURE FreeLabel1 (label : StrPtr) : APTR;
  474. PROCEDURE FreeLabel2 (label : StrPtr) : APTR;
  475. PROCEDURE FreeLLabel (label : StrPtr) : APTR;
  476. PROCEDURE FreeLLabel1(label : StrPtr) : APTR;
  477. PROCEDURE FreeLLabel2(label : StrPtr) : APTR;
  478. PROCEDURE FreeCLabel (label : StrPtr) : APTR;
  479. PROCEDURE FreeCLabel1(label : StrPtr) : APTR;
  480. PROCEDURE FreeCLabel2(label : StrPtr) : APTR;
  481. (*$ ENDIF *)
  482.  
  483. PROCEDURE KeyLabel  (label : StrPtr; HiChar : CHAR) : APTR;
  484. PROCEDURE KeyLabel1 (label : StrPtr; HiChar : CHAR) : APTR;
  485. PROCEDURE KeyLabel2 (label : StrPtr; HiChar : CHAR) : APTR;
  486. PROCEDURE KeyLLabel (label : StrPtr; HiChar : CHAR) : APTR;
  487. PROCEDURE KeyLLabel1(label : StrPtr; HiChar : CHAR) : APTR;
  488. PROCEDURE KeyLLabel2(label : StrPtr; HiChar : CHAR) : APTR;
  489.  
  490. (*$ IF MUI3 *)
  491. PROCEDURE FreeKeyLabel  (label : StrPtr; HiChar : CHAR) : APTR;
  492. PROCEDURE FreeKeyLabel1 (label : StrPtr; HiChar : CHAR) : APTR;
  493. PROCEDURE FreeKeyLabel2 (label : StrPtr; HiChar : CHAR) : APTR;
  494. PROCEDURE FreeKeyLLabel (label : StrPtr; HiChar : CHAR) : APTR;
  495. PROCEDURE FreeKeyLLabel1(label : StrPtr; HiChar : CHAR) : APTR;
  496. PROCEDURE FreeKeyLLabel2(label : StrPtr; HiChar : CHAR) : APTR;
  497. PROCEDURE FreeKeyCLabel (label : StrPtr; HiChar : CHAR) : APTR;
  498. PROCEDURE FreeKeyCLabel1(label : StrPtr; HiChar : CHAR) : APTR;
  499. PROCEDURE FreeKeyCLabel2(label : StrPtr; HiChar : CHAR) : APTR;
  500. (*$ ENDIF *)
  501.  
  502. (*$ ELSE *)
  503.  
  504. PROCEDURE Label  (label : ARRAY OF CHAR) : APTR;
  505. PROCEDURE Label1 (label : ARRAY OF CHAR) : APTR;
  506. PROCEDURE Label2 (label : ARRAY OF CHAR) : APTR;
  507. PROCEDURE LLabel (label : ARRAY OF CHAR) : APTR;
  508. PROCEDURE LLabel1(label : ARRAY OF CHAR) : APTR;
  509. PROCEDURE LLabel2(label : ARRAY OF CHAR) : APTR;
  510.  
  511. (*$ IF MUI3 *)
  512. PROCEDURE CLabel (label : ARRAY OF CHAR) : APTR ;
  513. PROCEDURE CLabel1(label : ARRAY OF CHAR) : APTR ;
  514. PROCEDURE CLabel2(label : ARRAY OF CHAR) : APTR ;
  515.  
  516. PROCEDURE FreeLabel  (label : ARRAY OF CHAR) : APTR;
  517. PROCEDURE FreeLabel1 (label : ARRAY OF CHAR) : APTR;
  518. PROCEDURE FreeLabel2 (label : ARRAY OF CHAR) : APTR;
  519. PROCEDURE FreeLLabel (label : ARRAY OF CHAR) : APTR;
  520. PROCEDURE FreeLLabel1(label : ARRAY OF CHAR) : APTR;
  521. PROCEDURE FreeLLabel2(label : ARRAY OF CHAR) : APTR;
  522. PROCEDURE FreeCLabel (label : ARRAY OF CHAR) : APTR;
  523. PROCEDURE FreeCLabel1(label : ARRAY OF CHAR) : APTR;
  524. PROCEDURE FreeCLabel2(label : ARRAY OF CHAR) : APTR;
  525. (*$ ENDIF *)
  526.  
  527. PROCEDURE KeyLabel  (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  528. PROCEDURE KeyLabel1 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  529. PROCEDURE KeyLabel2 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  530. PROCEDURE KeyLLabel (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  531. PROCEDURE KeyLLabel1(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  532. PROCEDURE KeyLLabel2(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  533.  
  534. (*$ IF MUI3 *)
  535. PROCEDURE FreeKeyLabel  (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  536. PROCEDURE FreeKeyLabel1 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  537. PROCEDURE FreeKeyLabel2 (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  538. PROCEDURE FreeKeyLLabel (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  539. PROCEDURE FreeKeyLLabel1(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  540. PROCEDURE FreeKeyLLabel2(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  541. PROCEDURE FreeKeyCLabel (label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  542. PROCEDURE FreeKeyCLabel1(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  543. PROCEDURE FreeKeyCLabel2(label : ARRAY OF CHAR; HiChar : CHAR) : APTR;
  544. (*$ ENDIF *)
  545.  
  546. (*$ ENDIF *)
  547.  
  548. (*
  549. **
  550. ** Controlling Objects
  551. **
  552. ** Again the same as in mui.h :
  553. **
  554. ** set : set an attribute of an object
  555. ** get : get an attribute of an object
  556. **       didn't work in previous releases :-( (but now!! :-)
  557. **
  558. *)
  559.  
  560. PROCEDURE get(obj : APTR; attr : LONGCARD; store : ADDRESS);
  561. PROCEDURE set(obj : APTR; attr : LONGCARD; value : LONGINT);
  562. PROCEDURE setmutex(obj : APTR; n : LONGINT);
  563. PROCEDURE setcycle(obj : APTR; n : LONGINT);
  564. (*$ IF Locale *)
  565. PROCEDURE setstring(obj : APTR; s : StrPtr);
  566. (*$ ELSE *)
  567. PROCEDURE setstring(obj : APTR; s : ARRAY OF CHAR);
  568. (*$ ENDIF *)
  569. PROCEDURE setcheckmark(obj : APTR; b : BOOLEAN);
  570. PROCEDURE setslider(obj : APTR; l : LONGINT);
  571.  
  572. (*
  573. ** Now some macros which are not part of mui.h (in other words : my own ;-)
  574. **
  575. ** First : NoteClose (app,obj,ID)
  576. **         ----------------------
  577. **         This macro sets up a notification on the close-gadget of a window.
  578. **         if it gets pressed, the app-obj gets back an ID
  579. **         app : the application-object, which will receive the ID
  580. **         obj : the window-object
  581. **         ID  : the ID, which will be send to the app-obj, when the user
  582. **               presses the close-gadget of the window-object specified in
  583. **               obj.
  584. *)
  585.  
  586. PROCEDURE NoteClose(app : APTR;
  587.                     obj : APTR;
  588.                     ID  : LONGINT);
  589.  
  590. (*
  591. **  Notebutton (app,obj,ID)
  592. **  -----------------------
  593. **  Sets up a notification on a button. If it gets pressed, the app-obj
  594. **  receives an ID.
  595. **  app : the app-obj, which will receive the ID.
  596. **  obj : the pointer to the Button-Object (created by Keybutton, etc.)
  597. **  ID  : The ID, which will be send to the app-obj.
  598. **
  599. *)
  600.  
  601. PROCEDURE NoteButton(app : APTR;
  602.                      obj : APTR;
  603.                      ID  : LONGINT);
  604.  
  605. (*
  606. ** RemMember (obj,member)
  607. ** ----------------------
  608. ** The following macro deletes a member from an object
  609. **
  610. ** obj      : The object which holds the child to remove
  611. ** member   : The child which shall be removed
  612. ** ATTENTION: You have to dispose the removed child-objects yourself!
  613. **
  614. *)
  615.  
  616. PROCEDURE RemMember(obj : APTR; member : APTR);
  617.  
  618. (*
  619. ** AddMember (obj,member)
  620. ** ----------------------
  621. ** This macro will add a new child to an group-  or application-object
  622. **
  623. ** obj      : The group or application to which the new object will be added
  624. ** member   : The new child-object which shall be added to obj.
  625. **
  626. *)
  627.  
  628. PROCEDURE AddMember(obj : APTR; member : APTR);
  629.  
  630. END MuiMacros.
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.